package com.quwan.manager.service;

import com.quwan.common.result.PageResult;
import com.quwan.manager.controller.dto.DispatchApplyDto;
import com.quwan.manager.controller.dto.DispatchDto;
import com.quwan.manager.controller.dto.PublishOrderListDTO;

/**
 * @author quan
 * @date 2021-10-29 20:49
 */

public interface ManagerOrderService {
    /**
     * 后台审核取消订单
     *
     * @param orderId
     * @param type    0不同意 1 同意
     * @return
     */
    boolean cancelOrder(String orderId, String type);

    /**
     * 会员发布订单列表
     *
     * @param publishOrderMember
     * @param categoryId
     * @return
     */
    PageResult<PublishOrderListDTO> getPublishOrderList(int pageNo,
                                                        int pageSize,
                                                        String publishOrderMember,
                                                        String categoryId,
                                                        String status,
                                                        String order,
                                                        String audit,
                                                        String mId,
                                                        String content,
                                                        String id);

    /**
     * 发单——关闭
     *
     * @param orderId
     * @return
     */
    boolean orderManagerPublishCancel(String orderId,Integer status);

    /**
     * 发单排序修改
     * @param orderId
     * @param orderNum
     * @return
     */
    boolean orderPublishChangeOrderNum(String orderId, Integer orderNum);

    /**
     * 发单审核通过
     * @param orderId
     * @return
     */
    boolean orderPass(String orderId);

    /**
     * 派单订单列表
     * @param page
     * @param size
     * @param orderId
     * @param dispatchMember
     * @param serviceMember
     * @param categoryId
     * @param content
     * @param status
     * @param sort
     * @return
     */
    PageResult<DispatchDto> dispatchOrderList(int page,
                                              int size,
                                              String orderId,
                                              String dispatchMember,
                                              String serviceMember,
                                              String categoryId,
                                              String content,
                                              String status,
                                              String sort,
                                              Integer audit);

    boolean dispatchChangeStatus(String id, Integer status);

    boolean updDispatchOrderOrderNum(String id, Integer orderNum);

    PageResult<DispatchApplyDto> dispatchApplyList(int page, int size, String id);

    /**
     * 取消派单
     * @param id
     * @param type
     * @return
     */
    void cancelDispatchOrder(String id, Integer type);

    /*8
        发单取消
     */
    void cancelPublishOrder(String id, Integer type);
}
